import { defineStore } from 'pinia'
import { ref } from 'vue'
export const Userstore = defineStore('user', () => {
    const  userinfo = ref({})
    //修改user数据
    const setuserinfo=(data)=>{
            userinfo.value=data
            console.log(userinfo.value);
    }
    const deluserinfo =()=>{
      userinfo.value ={}
    }
  return { userinfo ,setuserinfo,deluserinfo}
},{
  persist:true
})